package terminal_enum

// 终端鉴权操作类型
type terminalAuthOperationType int

var TerminalAuthOperationType terminalAuthOperationType

// 鉴权
func (c *terminalAuthOperationType) Auth() int {
	return 1
}

// 密钥交换
func (c *terminalAuthOperationType) SecretKeyExchange() int {
	return 2
}

func (c *terminalAuthOperationType) ToText(value int) string {
	switch value {

	case 1:
		return "鉴权"

	case 2:
		return "密钥交换"

	}
	return ""
}

func (c *terminalAuthOperationType) ToValue(text string) int {
	switch text {

	case "鉴权":
		return 1

	case "密钥交换":
		return 2

	}
	return 0
}
